package com.ydcloud.${packageName}.domain;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/*********************************************************************************************************
 * Copyright (c)
 * All rights reserved.
 *
 * 文件名称:public class ${jName}{ } 
 * 
 * 摘    要： ${jComment}
 * 版    本：1.0
 * 作    者：${createBy}
 * 创建于：${createDate}
 * 最后修改时间：
 * 
 *********************************************************************************************************/
public class ${jName}  implements Serializable  {

	/**
     * 意义，目的和功能，以及被用到的地方<br>
     */
    private static final long serialVersionUID = 1L;
    
	/**
	 * 添加一个空的构造函数（为了Jackson做转换）。
	 */
	public ${jName}() {
	}
	
	/**${jKey["jComment"]}*/
	private ${jKey["jType"]} ${jKey["jName"]};

	<#list paramList as param>  
	/**${param["jComment"]}*/
	private ${param["jType"]} ${param["jName"]};
    </#list>
    
    /**
     * 扩展参数
     */
    private Map<String,Object> extData =new HashMap<String, Object>();
    
    /**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column ${sName}.${jKey["sName"]}
	 * ${jKey["jComment"]}
	 * @return the value of ${sName}.${jKey["sName"]}
	 * @mbggenerated ${createDate}
	 */
	public ${jKey["jType"]} get${jKey["jFname"]}() {
		return ${jKey["jName"]};
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column ${sName}.${jKey["sName"]}
	 * ${jKey["jComment"]}
	 * @param ${jKey["jName"]} the value for ${sName}.${jKey["sName"]}
	 * @mbggenerated ${createDate}
	 */
    public void set${jKey["jFname"]}(${jKey["jType"]} ${jKey["jName"]}) {
		this.${jKey["jName"]} = ${jKey["jName"]};
	}

	<#list paramList as param> 
	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column ${sName}.${param["sName"]}
	 * ${param["jComment"]}
	 * @return the value of ${sName}.${param["sName"]}
	 * @mbggenerated ${createDate}
	 */
	public ${param["jType"]} get${param["jFname"]}() {
		return ${param["jName"]};
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column ${sName}.${param["sName"]}
	 * ${param["jComment"]}
	 * @param ${param["jName"]} the value for ${sName}.${param["sName"]}
	 * @mbggenerated ${createDate}
	 */
    public void set${param["jFname"]}(${param["jType"]} ${param["jName"]}) {
		this.${param["jName"]} = ${param["jName"]};
	}
	</#list>
	
	public Map<String, Object> getExtData() {
		return extData;
	}
    /**
     * 设置扩展参数
     * @param extData
     */
	public void setExtData(Map<String, Object> extData) {
		this.extData = extData;
	}
	/**
	 * 添加扩展参数
	 * @param key
	 * @param value
	 */
	public void put(String key,Object value) {
		this.extData.put(key, value);
	}
	/**
	 * 获取扩展参数
	 * @param key
	 * @return
	 */
	public Object get(String key){
		return this.extData.get(key);
	}

	public ${jName}(<#list paramList as param><#if (param_index==0)>${param["jType"]} ${param["jName"]}<#else>
	,${param["jType"]} ${param["jName"]}</#if> </#list>) {
		<#list paramList as param>
		this.${param["jName"]} = ${param["jName"]};
		</#list>
	}
	
	@Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ${jName} other = (${jName}) that;
        return (this.get${jKey["jFname"]}() == null ? other.get${jKey["jFname"]}() == null : this.get${jKey["jFname"]}().equals(other.get${jKey["jFname"]}()))
        <#list paramList as param>
            && (this.get${param["jFname"]}() == null ? other.get${param["jFname"]}() == null : this.get${param["jFname"]}().equals(other.get${param["jFname"]}()))</#list>;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((get${jKey["jFname"]}() == null) ? 0 : get${jKey["jFname"]}().hashCode());
        <#list paramList as param>
        result = prime * result + ((get${param["jFname"]}() == null) ? 0 : get${param["jFname"]}().hashCode());
        </#list>;
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ${jKey["jName"]}=").append(${jKey["jName"]});
        <#list paramList as param>
        sb.append(", ${param["jName"]}=").append(${param["jName"]});
        </#list>;
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

}